The use of graphics in computer applications is very widespread. The transmission of a document between computers or computing devices often includes the transmission of graphic data. This includes the transmission of facsimile messages from one facsimile (FAX) machine to another FAX machine, or the transmission of data from a host computer to a printer. Graphic data may be transmitted in the form of raster graphics in which the graphic image is rendered into a bit-map data file prior to transmission. For example, a FAX machine scans a document and generates a bit-map data file for each page.
Other devices, such as a printer coupled to a host computer, may also transfer graphic data relating to the pages to be printed by the printer. The host computer or the printer will render the graphic data into bit-map data. A common element in all of these examples is that one computer or device sends a graphic image to a second computer or device.
In some situations, the transmitting and the receiving devices may have some incompatibilities. A common incompatibility is that the transmitting and receiving devices do not have the same resolution for displaying or printing graphic images. For example, a typical computer display may have a graphic resolution of 96 pixels per inch, while a typical laser printer has a resolution of 300 pixels per inch. Thus, a graphic image created on the computer display cannot be directly printed on the printer without some form of scaling. Even so called "standard" FAX machines may have incompatible resolutions. The standard transmitting FAX machine may have a graphic image in one resolution while the standard receiving FAX machine may only be able to process graphic images with a different resolution. A FAX interface board in a computer is another FAX machine which may have yet another resolution for its graphic images.
Another common incompatibility is the paper on which graphic images are to be printed. A graphic image may have been created on one size of paper, such as 81/2 inch by 14 inch, but will be transmitted to a receiving device that can only process 81/2 inch by 11 inch paper even though the transmitting and receiving devices may have the same graphic resolution. To overcome the foregoing incompatibilities, the graphic image must be scaled to a resolution or size that can be processed by the receiving device.
There are several scaling procedures well known in the prior art. Some prior art systems scale an image by simply adding or deleting lines to the graphic data. For example a 2:1 reduction in vertical resolution may be easily accomplished by dropping every other line in a graphic image or dropping every other data point. While this approach may result in the desired resolution, it has the undesirable side effect of losing data in an arbitrary manner. FIG. 1A illustrates a graphic image having four horizontal scan rows 2a through 2d. The horizontal scan rows 2a and 2c contain all black pixels, while the horizontal scan rows 2b and 2d contain all white pixels. If a prior art system for scaling graphic images simply drops every other horizontal scan line to implement a 2:1 reduction in resolution, the result is that the all white horizontal scan rows 2b and 2d are dropped resulting in the unacceptable graphic image shown in FIG. 1B where there are two adjacent all black horizontal scan rows 2e and 2f. The graphic scaling of the prior art failed to preserve the diversity of colors present in the unsealed graphic image by simply dropping data bits without regard to the informational content of those data bits.
Some prior art systems perform more sophisticated scaling by emphasizing or selectively enhancing one pixel color over another. These prior art systems assume that a typical monochromatic graphic image is black printed on a white background. Therefore, these prior art systems define white as a background color and black as a foreground color. The general assumption taken by these prior art systems is that the foreground color contains more important data than the background color and is thus favored over the background color. With such a prior art system processing the graphic image data in FIG. 1A, the result would be the same image shown in FIG. 1B because the black pixels in the horizontal scan rows 2a and 2c would be favored and selected over the white pixels in the horizontal scan rows 2b and 2d. While any reduction in resolution will result in an actual loss of data, both of these prior art scaling techniques also lose the diversity of pixel colors, which results in the unacceptable graphic image of FIG. 1B.
As another example of the scaling performed by prior art systems, consider the unscaled graphic image of FIG. 2A in which four horizontal scan rows 4a, 4b, 4c, and 4d will be compressed into two horizontal scan rows. One prior art system deletes alternating horizontal scan rows (i.e., the horizontal scan lines 4b and 4d) regardless of background color, resulting in the unacceptable scaled image of FIG. 2B. In another prior art system that performs 2:1 compression of the graphic image, the pixels in the first line are compared with the corresponding pixels in the second line. Any pixels that have the same color will be compressed into a single pixel of the same color. Thus, the unsealed pixels 1 and 3 in each of the horizontal scan lines 4a and 4b are both black and will be compressed into the scaled black pixels 1 and 3 in the horizontal scan line 4g of the scaled graphic image of FIG. 2C. Similarly, unscaled pixels 2 and 4 in each of the horizontal scan lines 4a and 4b are both white and will thus be compressed into the scaled white pixels 2 and 4 in the horizontal scan line 4g of the scaled graphic image of FIG. 2C. This comparison is then repeated for the remaining pairs of lines in the unscaled image. Because pixels 1 in both of the horizontal scan lines 4c and 4d are white, they will be compressed into the scaled white pixel 1 of the horizontal scan line 4h. Pixels 4 in both of the horizontal scan lines 4c and 4d are black and will be compressed into the scaled black pixel 4 of the horizontal scan line 4h.
Pixels 2 of the horizontal scan lines 4c and 4d of FIG. 2A are white and black, respectively. The prior art system assumes that white is a background color and thus has less informational value than black pixels. Therefore, the prior art system will compress pixels 2 of the horizontal scan lines 4c and 4d into a single scaled black pixel 2 of the horizontal scan line 4h of FIG. 2C. Similarly, pixels 3 of the horizontal scan lines 4c and 4d are black and white, respectively. The prior art system again assumes that white is a background color and will compress pixel 3 of the horizontal scan lines 4c and 4d into a single scaled black pixel 3 of the horizontal scan line 4h. While data is always lost when reducing resolution of a graphic image, the prior art systems also lose additional informational content by making broad assumptions about the background color. If the unsealed graphic image of FIG. 2A were part of a graphic character, for example, the prior art scaled images of FIGS. 2B and 2C have lost the diversity of pixel colors originally contained in pixels 2 and 3 of the horizontal scan lines 4c and 4d of the unscaled image of FIG. 2A. As a result of this loss in diversity, there is a loss of image detail and an undesirably large degradation in the overall image clarity.
In all of the prior art graphic scaling systems, informational content and image detail can be lost because the pixels are scaled without regard to the background color or are scaled using broad assumptions about the background color. In either case, image detail and clarity may be lost in the scaled image by failing to consider the background color for portions of a graphic image. Therefore, it can be appreciated that there has been a significant need for a system and method for scaling graphic images using selective enhancement techniques that permit the retention of image clarity.